lib/repo-finder-mount: Change the schema for finding repos on volumes
authorPhilip Withnall <withnall@endlessm.com>
Fri, 15 Sep 2017 14:59:32 +0000 (15:59 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 19 Sep 2017 14:51:09 +0000 (14:51 +0000)
commit15247641d9e4bf6190954da806c8c08136d06f29
tree0c9b7b13c96c99a4c98a62fbd7dbd9fc94ab75b6
parent981eb6c2267f076bbb278f634fda83aa9dfac2a9
lib/repo-finder-mount: Change the schema for finding repos on volumes

See issue #1174 for the rationale behind this. In summary:
 • It required two lists of collection–refs to be maintained: one in the
   repository, and one pointing to the repository.
 • It didn’t automatically work for live USBs of OSs based on OSTree
   (where there’s always a repository at /ostree/repo).
 • It was unnecessarily complex.

The new scheme allows a list of repositories to be searched, but without
needing a layer of indirection through their collection–refs. It adds
/ostree/repo and /.ostree/repo as well-known repository locations which
are always checked on a mounted volume (if they exist).

Update the unit tests accordingly.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://github.com/ostreedev/ostree/issues/1174

Closes: #1179
Approved by: cgwalters
src/libostree/ostree-repo-finder-mount.c
tests/test-repo-finder-mount.c